<style>
    .forum-wrapper{padding: 20px 0;}
    @media (max-width: 1000px) {
        .forum-wrapper {padding: 0;}
        .page-wrapper{
            float: none !important;
            width: 100% !important;
        }
        .hot-posts{
            min-height: 200px!important;
        }
    }
    .hot-posts {border-right: 1px solid #e9e9e9;overflow: hidden;font-size: 14px;min-height: 400px;}
    .hot-header {color: #eee;font-size: 14px;padding: 10px 20px;border-left: 5px solid #1e88e5;}
    .hot-header .title {color: #444;  font-size: 16px;  font-weight: 400;  cursor: pointer;  }
    .hot-header .more {  float: right;  }
    .posts-content {  margin-top: 5px;  border-top: 1px solid #eee;  }
    .new-posts, .new-posts li {  list-style: disc;  }
    .posts-content li { display: flex;  padding: 3px 10px;  overflow: hidden;  vertical-align: bottom;  }
    .posts-content a { flex: 1;  color: #0f5489;  }
    .posts-content a:hover {  color: red;  text-decoration: underline;  }
    .posts-content span {  color: #999;  font-size: 12px;  float: right;  text-align: right;  }
    .hot-num-1 {  color: orange;  }
    .hot-num {  display: inline-block;  width: 20px;  height: 20px;  border-radius: 50%;  line-height: 20px;  text-align: center;  font-style: normal;  background-color: #eee;  }
    .selected {  font-weight: bold !important;  }
    #txt{
        width:210px;
        white-space:nowrap;
        text-overflow:ellipsis;
        -o-text-overflow:ellipsis;
        overflow: hidden;
    }
</style>
<div class="forum-wrapper">
    <div id="posts-content" class="bc-list" data-port="http://api.hongyanche.com/forum/forum_list">
        <input autocomplete='off' name='template' class ='hidden' value='1' />
        <div class="bc-list-template">
            <div class="page-wrapper" style="width: 50%; float: left; background-color: white;">
                <div class="hot-posts">
                    <div class="hot-header">
                        <span class="title selected"><cn list=1></cn></span>&nbsp;
                        &nbsp;|&nbsp; <span class="title js-hot">热门</span> |<span class="title js-new">最新 </span>
                        <em href="#forum_page" class="more" style="font-style: normal; color: #1e88e5; cursor: pointer;">更多 >></em>
                        <label_id list=1 class="hidden"></label_id>
                    </div>
                    <ul class="posts-content">
                        <new list="r">
                            <li>
                                <!--<i class="hot-num hot-num-1">1</i>-->
                                <top range=d>
                                    <span class="jinghua" style="display: inline-block;"><img style="vertical-align: middle" src="http://api.hongyanche.com/_hongyanche/material/top.gif" alt=""></span>
                                </top>
                                <highlight range=d>
                                    <span class="jinghua" style="display: inline-block;"><img style="vertical-align: middle; width: 18px;" src="http://api.hongyanche.com/_hongyanche/material/good.png" alt=""></span>
                                </highlight>
                                <a class="js-detail" id="txt" href="javascript:void (0)"><title range=1></title></a>
                                <forum_id range=1 class="hidden"></forum_id>
                                <span><user_name range=1></user_name></span>&nbsp;
                                <span><create_time range=1></create_time></span>
                            </li>
                        </new>
                        <hot list="r" class="hidden">
                            <li>
                                <!--<i class="hot-num hot-num-1">1</i>-->
                                <top range=d>
                                    <span class="jinghua" style="display: inline-block;"><img style="vertical-align: middle" src="http://api.hongyanche.com/_hongyanche/material/top.gif" alt=""></span>
                                </top>
                                <highlight range=d>
                                    <span class="jinghua" style="display: inline-block;"><img style="vertical-align: middle; width: 18px;" src="http://api.hongyanche.com/_hongyanche/material/good.png" alt=""></span>
                                </highlight>
                                <a class="js-detail" id="txt" href="javascript:void (0)"><title range=1></title></a>
                                <forum_id range=1 class="hidden"></forum_id>
                                <span><user_name range=1></user_name></span>&nbsp;
                                <span><create_time range=1></create_time></span>
                            </li>
                        </hot>
                    </ul>
                </div>
            </div>
        </div>
    </div>
</div>
{include file="home:forum-tab"/}
<script>
    (function (w, u) {
        $('.forum-wrapper').on('click', '.more', function () {
            var labelID = $(this).next().text();
            w.location.href = 'home?label_id=' + labelID +'#forum_page'
        });
        $('#posts-content').on('click', '.js-detail', function () {
            var postId = $(this).next().text();
            w.location.href = 'home?forum_id=' + postId +'#forum_article_detail'
        });

        $('body').on('click', '.js-hot', function () {
            $(this).parent().next().children('hot').removeClass('hidden');
            $(this).parent().next().children('new').addClass('hidden');

        });
        $('body').on('click', '.js-new', function () {
            $(this).parent().next().children('hot').addClass('hidden');
            $(this).parent().next().children('new').removeClass('hidden');
        });
    })(window, undefined);

    $.ajax({
        url:"/user/info",
        type:"post",
        success:function (data) {
            if(!data.state){
                if(WEIXIN.is()){
                    WEIXIN.login();
                }
            }
        }
    })
</script>